<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <form action="categoryUpdate.php" method="post">
            <table border="1">
                <tbody>
                    <tr>
                        <td>Category Name:</td>
                        <td>
                            <input type="hidden" name="id" value="<!--{$category.id}-->" />
                            <input type="hidden" name="page" value="<!--{$page}-->" />
                            <input type="text" name="category" value="<!--{$category.category}-->" />
                        </td>
                    </tr>
                    <tr>
                        <td>Parent</td>
                        <td>
                            <select name="parentID">
                                <!--{ if $category.parentID == -1  }-->
                                <option value="-1">Top(No parent)</option>
                                <!--{ else }-->
                                <!--{ foreach from = $parents item = parent }-->
                                <!--{ if $parent.id == $category.parentID }-->
                                <option value="<!--{ $parent.id }-->" selected><!--{ $parent.category}--></option>
                                <!--{ else }-->
                                <option value="<!--{ $parent.id }-->"><!--{ $parent.category}--></option>
                                <!--{ /if }-->
                                <!--{ /foreach  }-->
                                <!--{ /if }-->
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>Add Time</td>
                        <td><input type="hidden" name="inTime" value="<!--{$category.inTime}-->" /><!--{$category.inTime}--></td>
                    </tr>
                    <tr>
                        <td>Add By</td>
                        <td><input type="hidden" name="inUser" value="<!--{$category.inUser}-->" /><!--{$category.inUser}--></td>
                    </tr>
                    <tr >
                        <td><input type="submit" value="Confirm" name="submit" /></td>
                        <td><input type="reset" value="Reset" name="reset" /></td>
                    </tr>
                </tbody>
            </table>
        </form>
    </body>
</html>
